/*******************************************************************************
* Project: QSAR(Cute Software Architecture) 
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: DcmDspDid.c
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: Dcm
*
* Revision:
* --------------------------------------------------------------------------------
* v0.1: 
* Generation Time: 2025-01-07 18:25:30
*
**********************************************************************************/

/** HEADER FILES **/
#include "DcmDspDidCfg.h"
#include "DcmDspSvc10Cfg.h"
#include "DcmDspSvc27Cfg.h"

/** MACRO DEFINITION **/


/** TYPEDEF DEFINITION **/


/** LOCAL DATA DECLARATION **/
const DcmDspDataType DcmDspDataCfg[DcmDspDidConf_DataIndex_Max];
const DcmDspDidSignalType DcmDspDidSignalCfg[DcmDspDidConf_SignalIndex_Max];
const DcmDspDidInfoType DcmDspDidInfoCfg[DcmDspDidConf_DidIndex_Max];


/** LOCAL DATA **/
const DcmDspDataType DcmDspDataCfg[DcmDspDidConf_DataIndex_Max] = 
{
    /* SystemSupplierECUSoftwareVersionNumberDataIdentifier */
    {
        AppDiag_DID_0xF195_SystemSupplierECUSoftwareVersionNumberDataIdentifier_ReadData, /* ReadFnc */
        NULL_PTR, /* WriteFnc */
        NULL_PTR, /* ReturnControlToEcuFnc */
        NULL_PTR, /* ResetToDefaultFnc */
        NULL_PTR, /* FreezeCurrentStateFnc */
        NULL_PTR, /* ShortTermAdjustmentFnc */
        8 /* data byte size */
    },
    /* VINDataIdentifier */
    {
        AppDiag_DID_0xF190_VINDataIdentifier_ReadData, /* ReadFnc */
        AppDiag_DID_0xF190_VINDataIdentifier_WriteData, /* WriteFnc */
        NULL_PTR, /* ReturnControlToEcuFnc */
        NULL_PTR, /* ResetToDefaultFnc */
        NULL_PTR, /* FreezeCurrentStateFnc */
        NULL_PTR, /* ShortTermAdjustmentFnc */
        17 /* data byte size */
    },
    /* Voltage */
    {
        AppDiag_DID_0x1200_Voltage_ReadData, /* ReadFnc */
        NULL_PTR, /* WriteFnc */
        NULL_PTR, /* ReturnControlToEcuFnc */
        NULL_PTR, /* ResetToDefaultFnc */
        NULL_PTR, /* FreezeCurrentStateFnc */
        NULL_PTR, /* ShortTermAdjustmentFnc */
        2 /* data byte size */
    },
    /* IO_Testing */
    {
        AppDiag_DID_0x0200_IO_Testing_ReadData, /* ReadFnc */
        NULL_PTR, /* WriteFnc */
        AppDiag_DID_0x0200_IO_Testing_ReturnControlToECU, /* ReturnControlToEcuFnc */
        AppDiag_DID_0x0200_IO_Testing_ResetToDefault, /* ResetToDefaultFnc */
        AppDiag_DID_0x0200_IO_Testing_FreezeCurrentState, /* FreezeCurrentStateFnc */
        AppDiag_DID_0x0200_IO_Testing_ShortTermAdjustment, /* ShortTermAdjustmentFnc */
        1 /* data byte size */
    },
};

const DcmDspDidSignalType DcmDspDidSignalCfg[DcmDspDidConf_SignalIndex_Max] = 
{
    /* ByteSize,  ByteOffset,  didDataPtr */
    {8,          0,           (DcmDspDataType*)(&DcmDspDataCfg[DcmDspDidConf_DidIndex_SystemSupplierECUSoftwareVersionNumberDataIdentifier])},
    {17,          0,           (DcmDspDataType*)(&DcmDspDataCfg[DcmDspDidConf_DidIndex_VINDataIdentifier])},
    {2,          0,           (DcmDspDataType*)(&DcmDspDataCfg[DcmDspDidConf_DidIndex_Voltage])},
    {1,          0,           (DcmDspDataType*)(&DcmDspDataCfg[DcmDspDidConf_DidIndex_IO_Testing])},
};

const DcmDspDidInfoType DcmDspDidInfoCfg[DcmDspDidConf_DidIndex_Max] = 
{
    /* SystemSupplierECUSoftwareVersionNumberDataIdentifier */
    {
        /* did,  didUsed, didSize */
        0xF195,  SET,     8, 
        {{(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}}, /* readAccess */
        {{NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}}, /* writeAccess */
        {{NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}}, /* controlAccess */
        DcmDspDidConf_SignalNumber_SystemSupplierECUSoftwareVersionNumberDataIdentifier, /* signalNum */
        (DcmDspDidSignalType*)(&DcmDspDidSignalCfg[DcmDspDidConf_SignalIndex_SystemSupplierECUSoftwareVersionNumberDataIdentifier])/* didDataPtr */
    }, 
    /* VINDataIdentifier */
    {
        /* did,  didUsed, didSize */
        0xF190,  SET,     17, 
        {{(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}}, /* readAccess */
        {{(DcmDspSessionCfgType*)&DcmDspExtendedSession, NULL_PTR, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLev1, NULL_PTR, NULL_PTR}}, /* writeAccess */
        {{NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}}, /* controlAccess */
        DcmDspDidConf_SignalNumber_VINDataIdentifier, /* signalNum */
        (DcmDspDidSignalType*)(&DcmDspDidSignalCfg[DcmDspDidConf_SignalIndex_VINDataIdentifier])/* didDataPtr */
    }, 
    /* Voltage */
    {
        /* did,  didUsed, didSize */
        0x1200,  SET,     2, 
        {{(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}}, /* readAccess */
        {{NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}}, /* writeAccess */
        {{NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}}, /* controlAccess */
        DcmDspDidConf_SignalNumber_Voltage, /* signalNum */
        (DcmDspDidSignalType*)(&DcmDspDidSignalCfg[DcmDspDidConf_SignalIndex_Voltage])/* didDataPtr */
    }, 
    /* IO_Testing */
    {
        /* did,  didUsed, didSize */
        0x0200,  SET,     1, 
        {{(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}}, /* readAccess */
        {{NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}}, /* writeAccess */
        {{NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}}, /* controlAccess */
        DcmDspDidConf_SignalNumber_IO_Testing, /* signalNum */
        (DcmDspDidSignalType*)(&DcmDspDidSignalCfg[DcmDspDidConf_SignalIndex_IO_Testing])/* didDataPtr */
    }, 
 };

